import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter, Route, Switch } from "react-router-dom";

//首页
import Index1 from "./pages/Index1";
import Dice from "./pages/Dice1";
import HttpStu1 from "./pages/HttpStu1";
import Hello from "./pages/PropStu2";
//分类


const Main = () => (
  <main style={{ height: "100%" }}>
    <Switch>
      <Route exact path="/" component={Index1} />
      <Route exact path="/dice" component={Dice} />
      <Route exact path="/httpstu" component={HttpStu1} />
      <Route exact path="/hello" component={Hello} />
    </Switch>
  </main>
);

class App extends React.Component {
  render() {
    return (
      <div style={{ height: "100%" }}>
        <Main />
      </div>
    );
  }
}

export default App;
